package com.dyna.controller;

import com.dyna.bean.CommonsResult;
import com.dyna.service.FeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class FeignController {
    @Resource
    private FeignService feignService;

    @GetMapping("/consumer/payment/get/{id}")
    public CommonsResult getPaymentById(@PathVariable("id")Integer id){
        return feignService.getById(id);
    }

    @GetMapping("/consumer/payment/feign/timeout")
    public String feignTimeOut(){
        System.out.println("11111");
        return feignService.paymentFeignTimeOut();
    }
}
